#if NETFX_CORE
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#else
using System.Windows;
using System.Windows.Controls;
#endif

namespace FreshMeat.Xaml
{
   /// <summary>
   /// Shows one view out of a set of available views.
   /// The item container is of type <see cref="SlidingViewItem"/>.
   /// </summary>
   public class ViewPicker : ItemsControl
   {
      /// <summary>
      /// Dependency property for <see cref="SelectedItem"/>.
      /// </summary>
      public readonly static DependencyProperty SelectedItemProperty = DependencyProperty.Register("SelectedItem", typeof(object), typeof(ViewPicker), new PropertyMetadata(null));

#if !SILVERLIGHT && !NETFX_CORE
      static ViewPicker()
      {
         DefaultStyleKeyProperty.OverrideMetadata(typeof(ViewPicker), new FrameworkPropertyMetadata(typeof(ViewPicker)));
      }
#endif

      public ViewPicker()
      {
         DefaultStyleKey = typeof(ViewPicker);
      }

      protected override DependencyObject GetContainerForItemOverride()
      {
         var container = new SlidingViewItem();

         //if (ItemContainerStyle != null)
         //   container.Style = ItemContainerStyle;

         return container;
      }

      /// <summary>
      /// The currently selected item.
      /// </summary>
      public object SelectedItem
      {
         get { return GetValue(SelectedItemProperty); }
         set { SetValue(SelectedItemProperty, value); }
      }
   }

   public class SlidingViewItem : ContentPresenter
   {
   }
}